import { Dayjs } from 'dayjs';
export interface SearchInfo {
  userId?: number;
  ageFrom?: number;
  ageTo?: number;
  heightFrom?: number;
  heightTo?: number;
  weightFrom?: number;
  weightTo?: number;
  educationLevel?: string;
  profession?: string;
  incomeRange?: string;
  housingCarStatus?: string;
  maritalStatus?: string;
  location?: string;
}

export interface pageInfo {
  current?: number;
  pageSize?: number;
  total?: number;
  showTotal: Function;
  showSizeChanger: boolean;
  pageSizeOptions: string[];
  showSizeChange: Function;
  size: string;
  showQuickJumper: boolean;
  defaultPageSize: number;
}

export let pagination = ref<any>({
  // 数据总数
  total: 0,
  // 当前页数
  current: 1,
  // 每页条数
  pageSize: 10,
  // 展示总数
  showTotal: (total: number) => `共 ${total} 条`,
  // 是否可以改变pageSize
  showSizeChanger: true,
  // 设置每页可以展示多少条的选项
  pageSizeOptions: ['10', '20', '50', '100'],
  // 改变pageSize后触发
  showSizeChange: (current: number, pageSize: any) => (
    (pagination.value.current = current), (pagination.value.pageSize = pageSize)
  ),
  // 小尺寸分页
  size: 'small',
  // 是否可以快速跳转至某页
  showQuickJumper: true,
  //默认条数
  defaultPageSize: 10,
});

export const columns = ref<any>([
  {
    title: '用户ID，关联用户表',
    dataIndex: 'userId',
    key: 'userId',
  },
  {
    title: '理想年龄范围起始值',
    dataIndex: 'ageFrom',
    key: 'ageFrom',
  },
  {
    title: '理想年龄范围结束值',
    dataIndex: 'ageTo',
    key: 'ageTo',
  },
  {
    title: '理想身高范围起始值（单位：cm）',
    dataIndex: 'heightFrom',
    key: 'heightFrom',
  },
  {
    title: '理想身高范围结束值（单位：cm）',
    dataIndex: 'heightTo',
    key: 'heightTo',
  },
  {
    title: '理想体重范围起始值（单位：kg）',
    dataIndex: 'weightFrom',
    key: 'weightFrom',
  },
  {
    title: '理想体重范围结束值（单位：kg）',
    dataIndex: 'weightTo',
    key: 'weightTo',
  },
  {
    title: '理想学历（如：本科、硕士）',
    dataIndex: 'educationLevel',
    key: 'educationLevel',
  },
  {
    title: '理想职业',
    dataIndex: 'profession',
    key: 'profession',
  },
  {
    title: '理想年收入范围（如：5K-10K）',
    dataIndex: 'incomeRange',
    key: 'incomeRange',
  },
  {
    title: '理想车房情况（如：有房无车、车房都有）',
    dataIndex: 'housingCarStatus',
    key: 'housingCarStatus',
  },
  {
    title: '理想婚姻状况（如：未婚、离异）',
    dataIndex: 'maritalStatus',
    key: 'maritalStatus',
  },
  {
    title: '理想区域',
    dataIndex: 'location',
    key: 'location',
  },
  {
    title: '操作',
    key: 'operation',
    fixed: 'right',
    width: '160px',
  },
]);


export interface DataItem {
  userId: number;
  ageFrom: number;
  ageTo: number;
  heightFrom: number;
  heightTo: number;
  weightFrom: number;
  weightTo: number;
  educationLevel: string;
  profession: string;
  incomeRange: string;
  housingCarStatus: string;
  maritalStatus: string;
  location: string;
}

export interface ModelInfo {
  title?: string;
  width?: string;
  id?: number | undefined;
  confirmLoading?: boolean;
}

export interface dictInfo {
  typeCode?: string | number | undefined,
  typeName?: string | undefined,
}